package com.snack.shop.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 微信支付回调解密后的结果
 */
@Data
@Schema(description = "微信支付回调解密结果")
public class WxPayNotifyResult {

    @Schema(description = "商户号")
    private String mchid;

    @Schema(description = "小程序APPID")
    private String appid;

    @Schema(description = "商户订单号")
    private String outTradeNo;

    @Schema(description = "微信支付订单号")
    private String transactionId;

    @Schema(description = "交易类型")
    private String tradeType;

    @Schema(description = "交易状态")
    private String tradeState;

    @Schema(description = "交易状态描述")
    private String tradeStateDesc;

    @Schema(description = "付款银行")
    private String bankType;

    @Schema(description = "附加数据")
    private String attach;

    @Schema(description = "支付完成时间")
    private String successTime;

    @Schema(description = "支付者")
    private Payer payer;

    @Schema(description = "订单金额")
    private Amount amount;

    @Data
    public static class Payer {
        @Schema(description = "用户openid")
        private String openid;
    }

    @Data
    public static class Amount {
        @Schema(description = "总金额（分）")
        private Integer total;

        @Schema(description = "用户支付金额（分）")
        private Integer payerTotal;

        @Schema(description = "货币类型")
        private String currency;

        @Schema(description = "用户支付货币类型")
        private String payerCurrency;
    }
}

